package com.teachoa.web;

import java.util.Map;

import com.teachoa.bean.Menu;
import com.teachoa.bean.RoleMenu;
import com.teachoa.bean.User;

@SuppressWarnings("rawtypes")
public class MainController extends BaseController {
	
	public void index() {
		User user = getSessionAttr("user");
		int type = user.getInt("type");
		Map map = Menu.dao.getMenuTree(type);
		setAttr("menuMap", map);
		setAttr("userRole", type);
//		Menu.dao.createMenu();
//		RoleMenu.dao.createRoleMenu();
//		User.dao.createUser();
//		Dict.dao.createDict();
//		TeacherStudent.dao.createRelation();
		renderJsp("main.jsp");
	}
	
	public void content() {
		renderJsp("content.jsp");
	}

}
